home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene Storm
/
Scene Storm - Volume 1.iso
/
coding
/
c
/
hello_localized
/
hello3.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-01
|
1KB
|
42 lines
;/*
CatComp hello.cd CFILE hello_strings.h OBJFILE hello_strings.o
CatComp hello.cd hello.ct CATALOG sys:locale/Catalogs/Français/hello.catalog NOOPTIM
Quit */
#define CATCOMP_NUMBERS
#include "hello_strings.h"
#include <libraries/locale.h>
#include <pragmas/locale_pragmas.h>
#include <clib/locale_protos.h>
#include <string.h>
#include <clib/exec_protos.h>
#include <pragmas/exec_pragmas.h>
#include <proto/dos.h>
#include <proto/exec.h>
void PutString(int catalog_id,char *default_str);
struct Catalog *Catalog=0L;
struct Library *LocaleBase=0L;
struct DosLibrary *DOSBase=0L;
int long OutputBase=0L;
void __saveds hello(void)
{
DOSBase=OpenLibrary("dos.library", 0L);
OutputBase=Output();
if(LocaleBase=OpenLibrary("locale.library",38)) Catalog=OpenCatalogA(NULL,"hello.catalog",NULL);
PutString(MSG_HELLO,"Hello World!\n");
if(Catalog) CloseCatalog(Catalog);
if(LocaleBase) CloseLibrary(LocaleBase);
if(DOSBase) CloseLibrary((struct Library *)DOSBase);
}
void PutString(int catalog_id,char *default_str)
{
Write(OutputBase,GetCatalogStr(Catalog,catalog_id,default_str),strlen(GetCatalogStr(Catalog,catalog_id,default_str)));
}